
<div class="latest-news">
	<div class="latest-bottom">
		<div class="latest-top">
			<a href="#" class="fr"><img src="/assets/css/images/icon-rss.gif"
				alt="" /> </a>
			<h2>Latest News</h2>





			<?php
			foreach($newsList->result() as $news){
				?>
			<div class="news">
				<small> <a href="javascript:void(0);"
					alt="<?php echo $news->name;?>" onclick="submitLink(this);"> <?php echo $news->title;?>
				</a> </small>
				<?php
				/*
				 if(strlen($news->content) > 20){
				 echo substr($news->content,0,20);

				 <a href="javascript:void(0);" alt="<?php echo $news->name;?>" class="actions" onclick="submitLink(this);">read more...</a>
				 */
				?>

				<?php
				//}else
				$t = str_replace( "<br>" , "*****" , $news->content);
				$t = preg_replace('/<[^<|>]+?>/', '', htmlspecialchars_decode($t));
				$t = str_replace( "&nbsp;" , " " , $t);
				$t = str_replace( "*****" , "<br>" , $t);

				$t = htmlentities($t, ENT_QUOTES, "UTF-8");
				if(strlen($t) > 750){
					echo substr(strip_tags($news->content,"<p></p><div></div>") , 0, 750)."...";

					echo '<a href="javascript:void(0);" alt="'.$news->name.'" onclick = "submitLink(this)" class="more">Read More</a>';
				}else
				echo $t;
				?>

			</div>

			<?php
			}
			?>
			<!--
									<!--<div class="news">
										<small>20.06.09</small>
										<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vulputate suscipit ipsum, sit amet adipiscing nisl imperdiet nec. Mauris iaculis egestas quam....congue libero vestibulum vitae.</p>
									</div>-->
			<div class="cl">&nbsp;</div>
			<a href="javascript:void(0);" alt="news" class="actions"
			<?php if($page == 'news') echo 'class="active"';?>
				onclick="submitLink(this);">See All</a>

			<div class="cl">&nbsp;</div>
		</div>
	</div>
</div>


